﻿<!DOCTYPE HTML>
<html>

<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <meta name="viewport" content="width=480, user-scalable=0" />
    <title>天赋树-风起汉中篇</title>
    <style>
        :root {
            --primary-gray: #353535;
            --secondary-gray: #f5f5f5;
            --major-content-width: 820px;
            font-size: 16px;
        }

        body {
            margin: 0;
            padding: 1.2em;
            font-size: 1rem;
            font-family: Segoe UI, Helvetica, system-ui, -apple-system, Arial, sans-serif;
            color: var(--primary-gray);
        }

        :root[style*="scroll-bahavior: unset !important;"]>body::-webkit-scrollbar {
            display: none;
        }

        h1 {
            font-size: 1.8em;
            text-align: center;
        }

        .second-title {
            margin: 1em auto;
            text-align: center;
            color: #888;
        }

        main {
            margin: 0 auto;
            max-width: var(--major-content-width);
        }

        .talents {
            margin: 1.5em 0;
            border-inline: thin solid var(--primary-gray);
        }

        .talents>header,
        #talentsContainer {
            margin: 0;
            padding: 0;
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            place-items: center stretch;
            gap: 1.25em 0;
        }

        .talents>header {
            border-block: thin solid var(--primary-gray);
            background-color: #d5d5d5;
            font-size: 1.25em;
            position: sticky;
            inset-block-start: 0;
        }

        .talents>header>.header-item {
            padding: .5em .25em;
            font-weight: bold;
            text-align: center;
        }

        #talentsContainer {
            padding-block: .5em;
            background-image: repeating-linear-gradient(to right, var(--secondary-gray) 0 20%, transparent 20% 40%);
            list-style: none;
        }

        .talent-tactic {
            border-style: solid;
        }

        .talent-skill {
            border-style: dashed;
        }

        .talent-equip {
            border-style: double;
        }

        .talent-lv1 {
            background-color: #d9d9d9;
        }

        .talent-lv2 {
            background-color: #d9cbe7;
        }

        .talent-lv3 {
            background-color: #f8dfb9;
        }

        .talent-lv4 {
            background-color: #f9c3b8;
        }

        #talentsContainer>.talent-item {
            margin-inline: 5%;
            padding: .5em .25em;
            border-radius: 6px;
            border-width: medium;
            border-color: var(--primary-gray);
            font-weight: bold;
            text-align: center;
        }

        #talentsContainer>.talent-item::before {
            content: "\2b1c\fe0f";
            margin-inline-end: .2em;
            text-shadow: 0 0 2px var(--primary-gray);
            font-family: apple color emoji, Segoe UI emoji, android emoji, noto color emoji, emoji, sans-serif;
        }

        #talentsContainer>.talent-item.checked::before {
            content: "\2611\fe0f";
        }

        #talentsContainer>.talent-item::after {
            content: "[" attr(data-talent-cost) "]";
            font-size: .75em;
            vertical-align: text-top;
        }

        .talents>footer {
            padding: .5em 1.25em;
            display: flex;
            align-items: center;
            background-color: #d5d5d5;
            border-block: thin solid var(--primary-gray);
            position: sticky;
            inset-block-end: 0;
        }

        #resetButton {
            margin-inline-start: auto;
            padding: .25em 2em;
            border: thin solid var(--primary-gray);
            border-radius: 6px;
            background-color: var(--secondary-gray);
        }

        .introductions {
            display: flex;
            align-items: center;
        }

        .introductions>dt::after {
            content: "：";
        }

        .introductions>dd+dt {
            margin-inline-start: 2em;
        }

        .introductions>dd {
            margin: 0 .25em;
            padding: .1em .5em;
            border-radius: 6px;
            text-align: center;
        }

        .introductions>.talent-type,
        .introductions>.talent-level {
            padding: .1em .25em;
            border-radius: 6px;
        }

        .introductions>.talent-type {
            border-width: medium;
            border-color: var(--primary-gray);
        }
    </style>
</head>

<body>
    <main>
        <header>
            <h1>天赋树-风起汉中篇</h1>
            <div class="second-title">牧名 2024/6/7</div>
        </header>
        <section class="talents">
            <header>
                <span class="header-item">攻击</span>
                <span class="header-item">防御</span>
                <span class="header-item">爆发</span>
                <span class="header-item">反击</span>
                <span class="header-item">成长</span>
            </header>
            <ul id="talentsContainer"></ul>
            <footer>
                <strong>图册消耗：</strong><span id="totalCost">0</span><button id="resetButton">重置</span>
            </footer>
        </section>
        <section>
            <h2>补充说明</h2>
            <dl class="introductions">
                <dt>类型</dt>
                <dd class="talent-tactic">战法</dd>
                <dd class="talent-skill">技能</dd>
                <dd class="talent-equip">装备</dd>
                <dt>品质</dt>
                <dd class="talent-lv1">普通</dd>
                <dd class="talent-lv2">稀有</dd>
                <dd class="talent-lv3">史诗</dd>
                <dd class="talent-lv4">传说</dd>
            </dl>
        </section>
    </main>
    <script id="data" type="application/json">
        [{"id":1,"type":"tactic","name":"双刃·壹","desc":"每轮，你的首张【杀】至多能额外选择1个目标","cost":5,"level":2,"row":1,"col":1,"prev":[],"next":[3,7]},{"id":2,"type":"tactic","name":"技能传承","desc":"开局时，三选一获得一次稀有的技能","cost":5,"level":2,"row":1,"col":5,"prev":[],"next":[4,6]},{"id":3,"type":"skill","name":"青囊","desc":"出牌阶段限一次，你可以弃置一张手牌令一名角色回复1点体力。","cost":3,"level":1,"row":2,"col":2,"prev":[1],"next":[5,8]},{"id":4,"type":"skill","name":"势斩","desc":"出牌阶段限两次，你可以令一名其他角色视为对你使用一张【决斗】。","cost":3,"level":1,"row":2,"col":4,"prev":[2],"next":[5,11]},{"id":5,"type":"skill","name":"断发","desc":"出牌阶段，你可以弃置任意张黑色牌，然后摸等量张牌。你本阶段以此法弃置的总牌数不能大于你的体力上限。","cost":3,"level":1,"row":3,"col":3,"prev":[3,4],"next":[9]},{"id":6,"type":"skill","name":"绝策","desc":"结束阶段，你可以对一名没有手牌的其他角色造成1点伤害。","cost":3,"level":1,"row":3,"col":5,"prev":[2],"next":[12]},{"id":7,"type":"skill","name":"卫境","desc":"每轮限一次，你可以视为使用一张【杀】或【闪】。","cost":3,"level":1,"row":4,"col":1,"prev":[1],"next":[10]},{"id":8,"type":"tactic","name":"铁布衫·壹","desc":"游戏开始时，你获得1点护甲","cost":5,"level":1,"row":4,"col":2,"prev":[3],"next":[13]},{"id":9,"type":"tactic","name":"重击之技","desc":"对敌方造成伤害一次大于等于3点时，摸1张牌","cost":5,"level":1,"row":4,"col":3,"prev":[5],"next":[14]},{"id":10,"type":"skill","name":"决死","desc":"出牌阶段，你可以弃置一张【杀】并令攻击范围内一名其他角色弃置一张牌，若弃置牌不为【杀】且其体力值不小于你，你视为对其使用【决斗】。","cost":3,"level":1,"row":5,"col":1,"prev":[7],"next":[16]},{"id":11,"type":"skill","name":"智愚","desc":"当你受到伤害后，你可以摸一张牌，然后展示所有手牌，若颜色均相同，伤害来源弃置一张手牌。","cost":3,"level":1,"row":5,"col":4,"prev":[4],"next":[15]},{"id":12,"type":"tactic","name":"家财万贯","desc":"开始剧本时，你获得200铜币","cost":5,"level":1,"row":5,"col":5,"prev":[6],"next":[20]},{"id":13,"type":"equip","name":"藤甲","desc":"锁定技，【南蛮入侵】【万箭齐发】和普通【杀】对你无效。当你受到火焰伤害时，此伤害+1。","cost":8,"level":2,"row":6,"col":2,"prev":[8],"next":[18]},{"id":14,"type":"skill","name":"奇策","desc":"出牌阶段限一次，你可以将所有手牌当任意普通锦囊牌使用。","cost":3,"level":1,"row":6,"col":3,"prev":[9],"next":[19]},{"id":15,"type":"tactic","name":"破釜沉舟","desc":"回合外受到伤害一次大于等于3点时，对伤害来源造成等量同属性伤害。","cost":5,"level":1,"row":6,"col":4,"prev":[11],"next":[17]},{"id":16,"type":"tactic","name":"潜龙在渊","desc":"每有一个已解锁的空技能槽，则出杀次数+2","cost":5,"level":1,"row":7,"col":1,"prev":[10],"next":[21]},{"id":17,"type":"skill","name":"英魂","desc":"准备阶段，若你已受伤，你可以选择一名其他角色并选择一项：1.令其摸X张牌，然后弃置一张牌；2.令其摸一张牌，然后弃置X张牌。（X为你已损失体力值）","cost":3,"level":1,"row":7,"col":4,"prev":[15],"next":[22]},{"id":18,"type":"tactic","name":"藏桃户","desc":"【桃】不计入手牌上限","cost":5,"level":1,"row":8,"col":2,"prev":[13],"next":[23]},{"id":19,"type":"equip","name":"古锭刀","desc":"攻击范围：2<br><font color='#00FF00'>技能</font><br>锁定技，当你使用【杀】对目标角色造成伤害时，若该角色没有手牌，则此伤害+1。","cost":8,"level":2,"row":8,"col":3,"prev":[14],"next":[22,24]},{"id":20,"type":"equip","name":"寒冰剑","desc":"攻击范围：2<br><font color='#00FF00'>技能</font><br>当你使用【杀】对目标角色造成伤害时，若其有牌，你可以防止此伤害，然后你依次弃置其两张牌。","cost":4,"level":1,"row":8,"col":5,"prev":[12],"next":[22,29]},{"id":21,"type":"equip","name":"丈八蛇矛","desc":"攻击范围：3<br><font color='#00FF00'>技能</font><br>你可以将两张手牌当【杀】使用或打出。","cost":8,"level":2,"row":9,"col":1,"prev":[16],"next":[27]},{"id":22,"type":"tactic","name":"求仁得仁","desc":"回合外失去最后一张手牌后，摸2张牌","cost":5,"level":1,"row":9,"col":4,"prev":[17,19,20],"next":[26]},{"id":23,"type":"skill","name":"矢北","desc":"锁定技，当你每回合首次受到伤害后，你回复1点体力，然后当你本回合再受到伤害后，你失去1点体力。","cost":3,"level":1,"row":10,"col":2,"prev":[18],"next":[25]},{"id":24,"type":"tactic","name":"随身皮囊·壹","desc":"手牌上限+1","cost":5,"level":1,"row":10,"col":3,"prev":[19],"next":[28]},{"id":25,"type":"skill","name":"困奋","desc":"锁定技，结束阶段，你失去1点体力，然后摸两张牌。","cost":4,"level":1,"row":11,"col":2,"prev":[23],"next":[30]},{"id":26,"type":"equip","name":"黑光铠","desc":"锁定技，当你成为【杀】、伤害锦囊牌或黑色锦囊牌的目标后，若你不是唯一目标，此牌对你无效。","cost":10,"level":2,"row":11,"col":4,"prev":[22],"next":[31]},{"id":27,"type":"skill","name":"矜功","desc":"出牌阶段限一次，你可以将一张【杀】或装备牌当三张随机锦囊牌中的一张使用。","cost":4,"level":1,"row":12,"col":1,"prev":[21],"next":[30,34]},{"id":28,"type":"skill","name":"散谣","desc":"出牌阶段各限一次，你可以弃置一张牌对一名体力值/手牌数最大的角色造成1点伤害。","cost":4,"level":1,"row":12,"col":3,"prev":[24],"next":[30,32]},{"id":29,"type":"skill","name":"反间","desc":"出牌阶段限一次，你可以展示并交给一名其他角色一张手牌，其选择一项：1.展示所有手牌，弃置与此牌相同花色的牌；2.失去1点体力。","cost":4,"level":1,"row":12,"col":5,"prev":[20],"next":[33]},{"id":30,"type":"tactic","name":"拂衣去·闪","desc":"你的回合开始时，你获得1张【闪】","cost":12,"level":2,"row":13,"col":2,"prev":[25,27,28],"next":[37]},{"id":31,"type":"skill","name":"刚烈","desc":"当你受到伤害后，你可以判定，若结果不为红桃，伤害来源选择弃置两张手牌或受到1点伤害。","cost":8,"level":2,"row":13,"col":4,"prev":[26],"next":[38]},{"id":32,"type":"skill","name":"雪恨","desc":"出牌阶段限一次，你可以弃置一张红色牌并令至多X名角色（X为你已损失体力值且至少为1）进入连环状态，然后对其中一名角色造成1点火焰伤害。","cost":8,"level":2,"row":14,"col":3,"prev":[28],"next":[35]},{"id":33,"type":"equip","name":"赤炎镇魂琴","desc":"锁定技，你造成的伤害均视为火焰伤害。","cost":10,"level":2,"row":14,"col":5,"prev":[29],"next":[36]},{"id":34,"type":"tactic","name":"愈战愈勇·叁","desc":"从第7轮开始，你的【杀】造成的伤害+1","cost":6,"level":1,"row":15,"col":1,"prev":[27],"next":[39]},{"id":35,"type":"equip","name":"太公阴符","desc":"出牌阶段开始时，你可以令一名角色进入或解除连环状态；出牌阶段结束时，你可以重铸一张手牌。\n\n","cost":10,"level":2,"row":16,"col":3,"prev":[32],"next":[40]},{"id":36,"type":"tactic","name":"核心会员·壹","desc":"你可以消耗100铜币刷新商店，可刷新1次","cost":12,"level":1,"row":15,"col":5,"prev":[33],"next":[41]},{"id":37,"type":"skill","name":"看破","desc":"你可以将一张黑色牌当【无懈可击】使用。你的【无懈可击】不能被响应。","cost":8,"level":2,"row":16,"col":2,"prev":[30],"next":[39,42]},{"id":38,"type":"tactic","name":"后发先至","desc":"摸牌阶段，你的摸牌数-1；你的回合结束时，你摸3张牌","cost":12,"level":2,"row":15,"col":4,"prev":[31],"next":[43]},{"id":39,"type":"skill","name":"武圣","desc":"你可以将一张红色牌当【杀】使用或打出。你使用的方块【杀】无距离限制。","cost":8,"level":2,"row":17,"col":1,"prev":[34,37],"next":[47]},{"id":40,"type":"tactic","name":"虎骨酒·壹","desc":"每回合，你可以额外使用1次【酒】","cost":12,"level":2,"row":17,"col":3,"prev":[35],"next":[45]},{"id":41,"type":"skill","name":"胆守","desc":"出牌阶段，你可以弃置X张牌并选择你攻击范围内的一名其他角色（X为你本阶段发动本技能的次数），若X为：1，你弃置其一张牌；2，其交给你一张牌；3，你对其造成1点伤害；不小于4，你与其各摸两张牌。","cost":4,"level":1,"row":17,"col":5,"prev":[36],"next":[48]},{"id":42,"type":"tactic","name":"强健体魄·壹","desc":"游戏开始时，你增加1点体力上限并回复等量体力","cost":12,"level":2,"row":18,"col":2,"prev":[37],"next":[44]},{"id":43,"type":"skill","name":"恩怨","desc":"当你获得一名其他角色至少两张牌后，你可以令其摸一张牌。当你受到1点伤害后，你可以令伤害来源选择一项：1.交给你一张手牌；2.失去1点体力。","cost":8,"level":2,"row":18,"col":4,"prev":[38],"next":[46]},{"id":44,"type":"skill","name":"慷忾","desc":"当一名角色成为【杀】的目标后，若你与其距离1以内，你可以摸一张牌，然后展示并交给其一张牌，若为装备牌且其不是你，其可以使用之。","cost":8,"level":2,"row":20,"col":2,"prev":[42],"next":[53]},{"id":45,"type":"skill","name":"吉占","desc":"摸牌阶段，你可以改为展示牌堆顶的一张牌，猜测牌堆顶下一张牌点数大于或小于此牌，然后展示之，若猜对你继续猜测，最后你获得以此法展示的牌。","cost":8,"level":2,"row":19,"col":3,"prev":[40],"next":[49]},{"id":46,"type":"tactic","name":"草船借箭","desc":"【无懈可击】获得抵消的锦囊牌","cost":12,"level":2,"row":20,"col":4,"prev":[43],"next":[49,50]},{"id":47,"type":"equip","name":"青釭剑","desc":"攻击范围：2<br><font color='#00FF00'>技能</font><br>锁定技，当你使用【杀】指定目标后，你令其防具对此【杀】无效。","cost":10,"level":2,"row":20,"col":1,"prev":[39],"next":[49,52]},{"id":48,"type":"tactic","name":"蒸蒸日上","desc":"通过战斗关卡时，有20%几率获得更高一级的战法和技能奖励","cost":12,"level":2,"row":19,"col":5,"prev":[41],"next":[51]},{"id":49,"type":"tactic","name":"道生一","desc":"【无中生有】额外摸1张牌","cost":14,"level":2,"row":21,"col":3,"prev":[45,47,46],"next":[53,54]},{"id":50,"type":"equip","name":"护心镜","desc":"当你受到大于1点的伤害或致命伤害时，你可以将装备区里的【护心镜】置入弃牌堆，若如此做，你防止此伤害。出牌阶段，你可以将手牌中的【护心镜】置于其他角色的装备区。","cost":12,"level":2,"row":21,"col":4,"prev":[46],"next":[58]},{"id":51,"type":"skill","name":"奇袭","desc":"你可以将一张黑色牌当【过河拆桥】使用。","cost":8,"level":2,"row":21,"col":5,"prev":[48],"next":[55]},{"id":52,"type":"tactic","name":"淬血·壹","desc":"你每轮【杀】首次造成伤害后摸1张牌","cost":14,"level":2,"row":22,"col":1,"prev":[47],"next":[56]},{"id":53,"type":"skill","name":"再起","desc":"摸牌阶段，若你已受伤，你可以改为亮出牌堆顶X张牌（X为你已损失体力值+1），回复与其中红桃牌数等量的体力并获得剩余牌。","cost":8,"level":2,"row":22,"col":2,"prev":[44,49],"next":[57]},{"id":54,"type":"skill","name":"默识","desc":"结束阶段，你可以将一张手牌当你出牌阶段内使用过的第一张基本牌或普通锦囊牌使用，然后你可以将一张手牌当你出牌阶段使用过的第二张基本牌或普通锦囊牌使用。","cost":8,"level":2,"row":24,"col":3,"prev":[49],"next":[59,60]},{"id":55,"type":"skill","name":"暗箭","desc":"锁定技，当你使用【杀】对目标角色造成伤害时，若你不在其攻击范围内，此伤害+1。","cost":8,"level":2,"row":23,"col":5,"prev":[51],"next":[60]},{"id":56,"type":"skill","name":"铁骑","desc":"当你使用【杀】指定目标后，你可以判定，若为红色，其不能使用【闪】响应此【杀】。","cost":8,"level":2,"row":24,"col":1,"prev":[52],"next":[61]},{"id":57,"type":"tactic","name":"援助·贰","desc":"回合结束时，你摸2张牌","cost":26,"level":3,"row":23,"col":2,"prev":[53],"next":[62]},{"id":58,"type":"skill","name":"观潮","desc":"出牌阶段开始时，你可以选择一项：1.严格递增；2.严格递减。当你本回合使用牌时，若你本阶段使用过的所有牌的点数满足此项，你摸一张牌。","cost":8,"level":2,"row":24,"col":4,"prev":[50],"next":[63]},{"id":59,"type":"equip","name":"虚妄之冕","desc":"锁定技，摸牌阶段，你多摸两张牌。你的手牌上限-1。","cost":18,"level":3,"row":25,"col":3,"prev":[54],"next":[63,67]},{"id":60,"type":"tactic","name":"能说会道·贰","desc":"集市购买时降低20%铜币消耗","cost":26,"level":3,"row":25,"col":5,"prev":[55,54],"next":[68]},{"id":61,"type":"skill","name":"义绝","desc":"出牌阶段限一次，你可以弃置一张牌，然后令一名其他角色展示一张手牌。若此牌为：黑色，其本回合非锁定技失效且不能使用或打出手牌，你本回合对其使用的红桃【杀】伤害+1；红色，你获得之，然后你可以令其回复1点体力。","cost":8,"level":2,"row":26,"col":1,"prev":[56],"next":[66]},{"id":62,"type":"equip","name":"玲珑狮蛮带","desc":"当其他角色使用牌指定你为唯一目标后，你可以判定，若结果为红桃，此牌对你无效。","cost":12,"level":2,"row":26,"col":2,"prev":[57],"next":[64]},{"id":63,"type":"skill","name":"天香","desc":"当你受到伤害时，你可以弃置一张红桃牌防止之并选择一项，令一名其他角色：1.受到伤害来源的1点伤害并摸X张牌（X为其已损失体力值且至多为5）；2.失去1点体力并获得你弃置的牌。","cost":12,"level":3,"row":26,"col":4,"prev":[58,59],"next":[65]},{"id":64,"type":"skill","name":"遗计","desc":"当你受到1点伤害后，你可以观看牌堆顶的两张牌，然后将这些牌交给任意角色。","cost":12,"level":3,"row":27,"col":2,"prev":[62],"next":[66,69]},{"id":65,"type":"tactic","name":"精于谋略·贰","desc":"你手牌数量少于6，你的【杀】伤害+1","cost":26,"level":3,"row":27,"col":4,"prev":[63],"next":[70]},{"id":66,"type":"tactic","name":"三板斧·壹","desc":"你的每第3张【杀】伤害+1","cost":26,"level":3,"row":28,"col":1,"prev":[61,64],"next":[71]},{"id":67,"type":"tactic","name":"铸刀·贰","desc":"你使用【杀】后可以至多重铸2张牌","cost":26,"level":3,"row":28,"col":3,"prev":[59],"next":[72]},{"id":68,"type":"equip","name":"鸾凤和鸣剑","desc":"攻击范围：3<br><font color='#00FF00'>技能</font><br>当你使用的雷【杀】或火【杀】指定目标后，你可以令对方选择一项：1.弃置一张牌；2.令你摸一张牌。","cost":18,"level":3,"row":28,"col":5,"prev":[60],"next":[73]},{"id":69,"type":"equip","name":"仁王盾","desc":"锁定技，黑色【杀】对你无效。","cost":18,"level":3,"row":29,"col":2,"prev":[64],"next":[77]},{"id":70,"type":"equip","name":"禅让诏书","desc":"每回合每名角色限一次，当其他角色于其回合外首次获得牌时，你可以交给其一张牌或令其交给你一张牌。","cost":18,"level":3,"row":29,"col":4,"prev":[65],"next":[78]},{"id":71,"type":"skill","name":"酒池","desc":"你可以将一张黑桃手牌当【酒】使用。你使用【酒】无次数限制。当你使用【酒】【杀】造成伤害后，本回合【崩坏】失效。","cost":12,"level":3,"row":30,"col":1,"prev":[66],"next":[76]},{"id":72,"type":"skill","name":"洛神","desc":"准备阶段，你可以判定，若结果为黑色，你获得此牌，然后你可以重复此流程。以此法获得的牌本回合不计入手牌上限。","cost":12,"level":3,"row":30,"col":3,"prev":[67],"next":[74]},{"id":73,"type":"skill","name":"涅槃","desc":"限定技，当你处于濒死状态时，你可以弃置你区域内里的所有牌，复原你的武将牌，摸三张牌，回复至3点体力。","cost":8,"level":2,"row":30,"col":5,"prev":[68],"next":[75]},{"id":74,"type":"tactic","name":"手到擒来·叁","desc":"每回合你使用第6张牌后,你摸2张牌","cost":30,"level":3,"row":31,"col":3,"prev":[72],"next":[82]},{"id":75,"type":"skill","name":"完杀","desc":"锁定技，在你的回合内：只有你和处于濒死状态的角色才能使用【桃】；任意角色的濒死结算中，除你和濒死角色外的其他角色的非锁定技失效。","cost":14,"level":3,"row":31,"col":5,"prev":[73],"next":[83]},{"id":76,"type":"tactic","name":"醉拳","desc":"【酒】【杀】不能被抵消","cost":30,"level":3,"row":32,"col":1,"prev":[71],"next":[79]},{"id":77,"type":"skill","name":"良助","desc":"当一名角色于其出牌阶段内回复体力后，你可以选择一项：1.摸一张牌；2.令其摸两张牌。","cost":15,"level":3,"row":32,"col":2,"prev":[69],"next":[80,81]},{"id":78,"type":"skill","name":"雷击","desc":"当你使用或打出【闪】或使用【闪电】时，你可以判定。当你判定后，若结果为：黑桃，你可以对一名角色造成2点雷电伤害；梅花，你回复1点体力并可以对一名角色造成1点雷电伤害。","cost":15,"level":3,"row":32,"col":4,"prev":[70],"next":[80]},{"id":79,"type":"skill","name":"连破","desc":"你杀死过角色的回合结束后，你可以执行一个额外的回合。","cost":15,"level":3,"row":33,"col":1,"prev":[76],"next":[84]},{"id":80,"type":"tactic","name":"招募后勤·贰","desc":"初始手牌-2，摸牌数+2","cost":30,"level":3,"row":33,"col":4,"prev":[78,77],"next":[88]},{"id":81,"type":"tactic","name":"好身法","desc":"【闪】不计入手牌上限","cost":30,"level":3,"row":34,"col":2,"prev":[77],"next":[86]},{"id":82,"type":"skill","name":"蒺藜","desc":"当你每回合使用或打出第X张牌时，你可以摸X张牌。（X为你的攻击范围）","cost":15,"level":3,"row":34,"col":3,"prev":[74],"next":[87]},{"id":83,"type":"tactic","name":"集市霸王","desc":"在集市中购买时价格将不再递增","cost":30,"level":3,"row":34,"col":5,"prev":[75],"next":[85]},{"id":84,"type":"equip","name":"无双方天戟","desc":"当你使用【杀】对目标角色造成伤害后，你可以摸一张牌或弃置其一张牌。","cost":25,"level":4,"row":35,"col":1,"prev":[79],"next":[89]},{"id":85,"type":"skill","name":"雅士","desc":"当你受到伤害后，你可以选择一项：1.令伤害来源的非锁定技失效直到其下个回合开始；2.对一名其他角色执行【观虚】的效果。","cost":15,"level":3,"row":35,"col":5,"prev":[83],"next":[91]},{"id":86,"type":"skill","name":"火计","desc":"你可以将一张红色牌当【火攻】使用。你的【火攻】改为令目标展示随机手牌，你弃置与展示牌颜色相同的牌以造成伤害。","cost":15,"level":3,"row":36,"col":2,"prev":[81],"next":[90]},{"id":87,"type":"skill","name":"制衡","desc":"出牌阶段限一次，你可以弃置任意张牌，然后摸等量张牌，若你以此法弃置了所有手牌，你额外摸一张牌。","cost":15,"level":3,"row":36,"col":3,"prev":[82],"next":[90,92]},{"id":88,"type":"skill","name":"清弦","desc":"当你受到伤害/回复体力后，若没有角色处于濒死状态，你可以令伤害来源/一名其他角色执行一项：1.失去1点体力，随机使用一张装备牌；2.回复1点体力，弃置一张装备牌。若其使用或弃置的牌为梅花牌，你摸一张牌。 ","cost":15,"level":3,"row":36,"col":4,"prev":[80],"next":[93]},{"id":89,"type":"skill","name":"凤魄","desc":"当你在回合内首次使用【杀】或【决斗】指定一个目标后，你可以选择一项：1.摸X张牌；2.令此牌伤害+X。（X为目标角色方块手牌数）","cost":15,"level":3,"row":37,"col":1,"prev":[84],"next":[94]},{"id":90,"type":"tactic","name":"外练筋骨·贰","desc":"每轮开始时，你获得2点护甲","cost":50,"level":4,"row":37,"col":2,"prev":[86,87],"next":[95]},{"id":91,"type":"skill","name":"观微","desc":"每回合限一次，每名角色出牌阶段结束时，若其本回合使用过至少两张牌且这些牌花色均相同，你可以弃置一张牌，令其摸两张牌并执行一个额外的出牌阶段。","cost":15,"level":3,"row":37,"col":5,"prev":[85],"next":[99]},{"id":92,"type":"skill","name":"乱击","desc":"你可以将两张花色相同的手牌当【万箭齐发】使用。","cost":20,"level":4,"row":38,"col":3,"prev":[87],"next":[98]},{"id":93,"type":"skill","name":"芳魂","desc":"当你使用【杀】造成伤害或受到【杀】的伤害后，你获得与伤害值等量枚「梅影」标记。你可以移除1枚「梅影」发动<font href='37'>【龙胆】</font>并摸一张牌。","cost":20,"level":4,"row":38,"col":4,"prev":[88],"next":[96]},{"id":94,"type":"skill","name":"激昂","desc":"当你使用【决斗】或红色【杀】指定目标后，或成为【决斗】或红色【杀】的目标后，你可以摸一张牌。每回合首次【决斗】或红色【杀】因弃置进入弃牌堆后，你可以失去1点体力获得之。","cost":20,"level":4,"row":39,"col":1,"prev":[89],"next":[97]},{"id":95,"type":"skill","name":"奸回","desc":"锁定技，你记录上次对你造成伤害的其他角色。当你对其造成伤害后，你摸一张牌；当其对你造成伤害后，其弃置一张牌。","cost":20,"level":4,"row":39,"col":2,"prev":[90],"next":[97,100]},{"id":96,"type":"tactic","name":"荆棘之甲","desc":"每次受到伤害后对伤害来源造成1点伤害","cost":50,"level":4,"row":39,"col":4,"prev":[93],"next":[101]},{"id":97,"type":"tactic","name":"远击之技","desc":"造成伤害时，若你与其距离大于1，此伤害+1","cost":50,"level":4,"row":40,"col":1,"prev":[94,95],"next":[105]},{"id":98,"type":"equip","name":"修罗炼狱戟","desc":"你使用【杀】可以多指定任意名攻击范围内的其他角色为目标。锁定技，当你使用【杀】造成伤害时，此伤害+1，然后令受到伤害的角色回复1点体力。","cost":25,"level":4,"row":40,"col":3,"prev":[92],"next":[106]},{"id":99,"type":"tactic","name":"利滚利·贰","desc":"每场战斗后,你的总铜币数量增加10%","cost":50,"level":4,"row":40,"col":5,"prev":[91],"next":[104]},{"id":100,"type":"skill","name":"狂骨","desc":"当你对距离1以内的一名角色造成1点伤害后，你可以回复1点体力或摸一张牌。","cost":25,"level":4,"row":41,"col":2,"prev":[95],"next":[102]},{"id":101,"type":"equip","name":"三首","desc":"当你受到伤害时，你可以亮出牌堆顶三张牌，若包含本回合未使用过的类型，你防止此伤害。","cost":30,"level":4,"row":41,"col":4,"prev":[96],"next":[103]},{"id":102,"type":"equip","name":"奇门八阵","desc":"锁定技，【杀】对你无效。","cost":30,"level":4,"row":42,"col":2,"prev":[100],"next":[111]},{"id":103,"type":"skill","name":"强识","desc":"出牌阶段开始时，你可以展示一名其他角色一张手牌，然后当你本阶段使用与展示牌类型相同的牌时，你可以摸一张牌。","cost":25,"level":4,"row":42,"col":4,"prev":[101],"next":[115]},{"id":104,"type":"skill","name":"博图","desc":"每轮限X次（X为存活角色数且至多为3），回合结束后，若本回合置入弃牌堆的牌包含四种花色，你可以执行一个额外回合。","cost":25,"level":4,"row":42,"col":5,"prev":[99],"next":[107]},{"id":105,"type":"skill","name":"龙吟","desc":"当一名角色于其出牌阶段内使用【杀】时，你可以弃置一张牌，令此【杀】不计入此阶段使用次数，若此【杀】为红色，你摸一张牌。","cost":25,"level":4,"row":43,"col":1,"prev":[97],"next":[108,110]},{"id":106,"type":"skill","name":"双雄","desc":"摸牌阶段结束时，你可以弃置一张牌，然后你本回合可以将一张与之颜色不同的牌当【决斗】使用。结束阶段，你获得本回合对你造成伤害的牌。","cost":25,"level":4,"row":43,"col":3,"prev":[98],"next":[108]},{"id":107,"type":"equip","name":"国风玉袍","desc":"锁定技，你不能成为其他角色使用普通锦囊牌的目标。","cost":30,"level":4,"row":43,"col":5,"prev":[104],"next":[109]},{"id":108,"type":"tactic","name":"随身皮囊·叁","desc":"手牌上限+5","cost":60,"level":4,"row":44,"col":3,"prev":[106,105],"next":[114]},{"id":109,"type":"skill","name":"当先","desc":"锁定技，回合开始时，你执行一个额外的出牌阶段。","cost":25,"level":4,"row":44,"col":5,"prev":[107],"next":[112]},{"id":110,"type":"equip","name":"鬼龙斩月刀","desc":"锁定技，你使用的红色【杀】不能被【闪】响应。","cost":30,"level":4,"row":45,"col":1,"prev":[105],"next":[113]},{"id":111,"type":"skill","name":"伤逝","desc":"当你的手牌数小于X后，你可以将手牌摸至X张。（X为你已损失体力值）","cost":25,"level":4,"row":45,"col":2,"prev":[102],"next":[117]},{"id":112,"type":"skill","name":"魅步","desc":"其他角色出牌阶段开始时，若你在其攻击范围内，你可以弃置一张牌，令其本回合视为拥有<font href='258'>【止息】</font>。若你弃置的牌不是【杀】或黑色锦囊牌，本回合其与你的距离视为1。","cost":25,"level":4,"row":45,"col":5,"prev":[109],"next":[120]},{"id":113,"type":"skill","name":"武神","desc":"锁定技，你的红桃手牌视为【杀】。你的红桃【杀】无距离和次数限制且不能被抵消。","cost":25,"level":4,"row":46,"col":1,"prev":[110],"next":[116]},{"id":114,"type":"skill","name":"龙魂","desc":"你可以将至多两张花色相同的牌按以下规则使用或打出：红桃当【桃】；方块当火【杀】；梅花当【闪】；黑桃当【无懈可击】。若你以此法转化使用了两张：红色牌，此牌回复值或伤害值+1；黑色牌，你弃置当前回合角色一张牌。","cost":25,"level":4,"row":46,"col":3,"prev":[108],"next":[118]},{"id":115,"type":"skill","name":"豹变","desc":"锁定技，若你的体力值：不大于3，你视为拥有<font href='985'>【挑衅】</font>；不大于2，你视为拥有<font href='34'>【咆哮】</font>；为1，你视为拥有<font href='363'>【神速】</font>。","cost":25,"level":4,"row":46,"col":4,"prev":[103],"next":[119,120]},{"id":116,"type":"tactic","name":"二连击·贰","desc":"你的出牌阶段，你的出杀次数+2","cost":60,"level":4,"row":47,"col":1,"prev":[113],"next":[]},{"id":117,"type":"tactic","name":"铁布衫·肆","desc":"游戏开始时，你获得6点护甲","cost":60,"level":4,"row":47,"col":2,"prev":[111],"next":[]},{"id":118,"type":"tactic","name":"探囊取物·贰","desc":"摸牌阶段，你的摸牌数+2","cost":60,"level":4,"row":47,"col":3,"prev":[114],"next":[]},{"id":119,"type":"tactic","name":"卧薪尝胆","desc":"回合外每受到1次伤害，下回合出杀次数+1","cost":60,"level":4,"row":47,"col":4,"prev":[115],"next":[]},{"id":120,"type":"tactic","name":"日行千里·贰","desc":"每个章节，你可以额外行动2次","cost":60,"level":4,"row":47,"col":5,"prev":[112,115],"next":[]}]
    </script>
    <script type="text/javascript">
        (function () {
            "use strict";
            const talents = JSON.parse(document.getElementById("data").text);
            if (!Array.isArray(talents) || talents.length === 9) {
                console.error('no data');
                alert('no data');
                return;
            }
            const talentDict = new Map();
            const checkedTalentIds = new Set();
            const talentElementDict = new Map();
            let totalCost = 0;
            function createTalentItemElement(talent) {
                const itemElement = document.createElement('li');
                itemElement.classList.add('talent-item', `talent-lv${talent.level}`, `talent-${talent.type}`);
                itemElement.style.cssText = `grid-area: ${talent.row}/${talent.col}/span 1/span 1;`;
                itemElement.setAttribute('data-talent-id', talent.id);
                itemElement.setAttribute('data-talent-cost', talent.cost);
                const title = talent.desc.replaceAll(/<br\/?>/g, '\n')
                    .replaceAll(/<font(?:\s+[\w\-]+=('|")[#\w\s\-:]+\1)+>([^<>]+)<\/font>/g, '$2')
                    .replaceAll(/(.{20})/gm, '$1\n');
                itemElement.setAttribute('title', title);
                itemElement.textContent = talent.name;
                return itemElement;
            }
            function toggleTalent(id) {
                if (!checkedTalentIds.has(id)) {
                    checkTalent(id);
                } else {
                    uncheckTalent(id);
                }
            }
            function checkTalent(id) {
                const processTalentIds = Array.of(id);
                while (processTalentIds.length > 0) {
                    const curTalentId = processTalentIds.pop();
                    if (checkedTalentIds.has(curTalentId)) {
                        continue;
                    }
                    checkedTalentIds.add(curTalentId);
                    const curElement = talentElementDict.get(curTalentId);
                    curElement.classList.add('checked');
                    const curTalent = talentDict.get(curTalentId);
                    totalCost += curTalent.cost;
                    processTalentIds.push.apply(processTalentIds, curTalent.prev);
                }
            }
            function uncheckTalent(id) {
                const processTalentIds = Array.of(id);
                while (processTalentIds.length > 0) {
                    const curTalentId = processTalentIds.pop();
                    if (!checkedTalentIds.has(curTalentId)) {
                        continue;
                    }
                    checkedTalentIds.delete(curTalentId);
                    const curElement = talentElementDict.get(curTalentId);
                    curElement.classList.remove('checked');
                    const curTalent = talentDict.get(curTalentId);
                    totalCost -= curTalent.cost;
                    processTalentIds.push.apply(processTalentIds, curTalent.next);
                }
            }
            function resetTalents() {
                for (const id of checkedTalentIds) {
                    const curElement = talentElementDict.get(id);
                    curElement.classList.remove('checked');
                }
                checkedTalentIds.clear();
                totalCost = 0;
            }
            document.addEventListener('DOMContentLoaded', () => {
                const totalCostElement = document.getElementById('totalCost');
                const resetButton = document.getElementById('resetButton');
                const container = document.getElementById('talentsContainer');
                container.addEventListener('click', (event) => {
                    const target = event.target;
                    if (!target.matches("li.talent-item")) {
                        return;
                    }
                    event.stopPropagation();
                    const talentId = parseInt(target.getAttribute('data-talent-id'));
                    toggleTalent(talentId);
                    totalCostElement.textContent = totalCost;
                });
                resetButton.addEventListener('click', () => {
                    resetTalents();
                    totalCostElement.textContent = totalCost;
                });
                for (const talent of talents) {
                    talentDict.set(talent.id, talent);
                    const itemElement = createTalentItemElement(talent);
                    container.appendChild(itemElement);
                    talentElementDict.set(talent.id, itemElement);
                }
            });
        })();
    </script>
</body>

</html>